function verify() {
    return true;
}

function submitComment() {
    if (verify()) {
        var inputList = [$('#hardwareType'), $('#hardwareId'), $('#score'), $('#title'), $('#advantage'), $('#disadvantage'), $('#summary')];
        var parameters = new Object();
        for (var i in inputList) {
            var input = inputList[i];
            parameters[input.attr('name')] = input.val();
        }
        /*-----=====浏览器控制台输出=====-----
        for (var v in parameters) {
            console.log(v+': '+parameters[v]);
        }
        -----=========================-----*/
        $.post(BASEPATH+'/addHcomment.do', parameters, function(data) {
            if (data == '提交成功！') {
                $('.comment-post form').trigger('reset');
                window.location.reload();
            } else {
                alert(data);
            }
        }, 'text');
    }
}